﻿using System.Collections.Generic;
using ZilLion.Service.Core.DapperWrapper;
using ZilLion.Service.WeChatMall.Domain.Entitys.ShopInfo;

namespace ZilLion.Service.WeChatMall.Domain.Repositorys.Interface.ShopInfo
{
    public interface IShopGsRelationShipReponsitory
    {
        /// <summary>
        ///     根据shopid 获取关系
        /// </summary>
        /// <param name="shopid"></param>
        /// <returns></returns>
        IList<ShopGsRelationShipEntity> GetRelationByShopid(long shopid);

        /// <summary>
        ///     建立关系
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="unit"></param>
        void AddRelationShip(ShopGsRelationShipEntity entity, UnitOfWork unit = null);

        /// <summary>
        ///     取消关系
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="unit"></param>
        void RemoveRelationShip(ShopGsRelationShipEntity entity, UnitOfWork unit = null);

        /// <summary>
        ///     根据gsid 删除数据
        /// </summary>
        /// <param name="gsid"></param>
        void RemoveByGsid(long gsid, UnitOfWork unit = null);

        /// <summary>
        ///     根据shopid 删除货品关系
        /// </summary>
        /// <param name="shopid"></param>
        /// <param name="unit"></param>
        void RemoveRelationByShopid(long shopid, UnitOfWork unit = null);
    }
}